package main 

import (
	"fmt"
	_"unsafe"
	"strconv"
)

//基本类型转string
func main(){


	var num1 int=10
	var num2 float64 = 22.22
	var b bool
	var c byte = 'a'

	var str string 

	str = fmt.Sprintf("%d",num1)
	fmt.Printf("str type %T,str v =%v\n",str,str)

	str = fmt.Sprintf("%f",num2)
	fmt.Printf("str type %T,str v =%q\n",str,str)

	str = fmt.Sprintf("%t",b)
	fmt.Printf("str type %T,str v =%q\n",str,str)

	str = fmt.Sprintf("%c",c)
	fmt.Printf("str type %T,str v =%q\n",str,str)

	var num3 int=10
	var num4 float64 = 22.22
	var b2 bool

	str = strconv.FormatInt(int64(num3),10)
	fmt.Printf("str type %T,str v =%q\n",str,str)


	str = strconv.FormatFloat(num4,'f',10,64)
	fmt.Printf("str type %T,str v =%q\n",str,str)

	str = strconv.FormatBool(b2)
	fmt.Printf("str type %T,str v =%q\n",str,str)

	var num5 int64 = 5678

	str = strconv.Itoa(int(num5))
	fmt.Printf("str type %T,str v =%q\n",str,str)

}